﻿IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ReaderHelperTests]') AND type in (N'U'))
DROP TABLE [dbo].[ReaderHelperTests]

CREATE TABLE [dbo].[ReaderHelperTests](
	[Id] [int] NOT NULL,
	[Name] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UniqueId] [uniqueidentifier] NULL,
	[Boolean] [bit] NULL,
	[Byte] [tinyint] NULL,
	[Int16] [smallint] NULL,
	[Int32] [int] NULL,
	[Int64] [bigint] NULL,
	[Float] [real] NULL,
	[Double] [float] NULL,
	[Chars] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Dollars] [money] NULL,
	[DateTime] [datetime] NULL,
	[Buffer] [varbinary](50) NULL,
 CONSTRAINT [PK_ReaderHelperTests] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

-- Row 1 is NULLs
INSERT INTO [dbo].[ReaderHelperTests] ([Id])
VALUES (1)


-- Row 2 is defaults
INSERT INTO [dbo].[ReaderHelperTests]
           ([Id]
           ,[Name]
           ,[UniqueId]
           ,[Boolean]
           ,[Byte]
           ,[Int16]
           ,[Int32]
           ,[Int64]
           ,[Float]
           ,[Double]
           ,[Chars]
           ,[Dollars])
     VALUES
           (2
           ,N''
           ,'00000000-0000-0000-0000-000000000000'
           ,0
           ,0
           ,0
           ,0
           ,0
           ,0.0
           ,0.0
           ,''
           ,0.0)

-- Row 3 is some values
INSERT INTO [dbo].[ReaderHelperTests]
           ([Id]
           ,[Name]
           ,[UniqueId]
           ,[Boolean]
           ,[Byte]
           ,[Int16]
           ,[Int32]
           ,[Int64]
           ,[Float]
           ,[Double]
           ,[Chars]
           ,[DateTime]
           ,[Dollars])
     VALUES
           (3
           ,N'Andrew'
           ,'96969346-E22E-4b08-9388-5D4F32E48E59'
           ,1
           ,47
           ,123
           ,9999
           ,123456789
           ,0.5
           ,1.0
           ,'Andrew'
           ,'May 29 2008'
           ,15.67)